import request from '@/utils/request'

// 查询工作单位列表
export function listWorkplace(query) {
  return request({
    url: '/workplace/workplace/list',
    method: 'get',
    params: query
  })
}

// 查询工作单位详细
export function getWorkplace(id) {
  return request({
    url: '/workplace/workplace/' + id,
    method: 'get'
  })
}

// 新增工作单位
export function addWorkplace(data) {
  return request({
    url: '/workplace/workplace',
    method: 'post',
    data: data
  })
}

// 修改工作单位
export function updateWorkplace(data) {
  return request({
    url: '/workplace/workplace',
    method: 'put',
    data: data
  })
}

// 删除工作单位
export function delWorkplace(id) {
  return request({
    url: '/workplace/workplace/' + id,
    method: 'delete'
  })
}
